Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

230
Visualizações
Apps Script "OR" logical operator

Our "Current Tutors" sheet has a list of tutor names in column N (shown as row [13] in the code). Column A is the # of students they have (row [0]) in the code.

Basically, we want to filter our Google Form choices so that only tutors with values of 0 or 1 in column A appear. Unfortunately, it looks like the "|" does not do the logical operation of 0 OR 1. It just returns tutor names who have 0 students.

We are not savvy with coding, so any down-to-earth explanation is appreciated!

var approvedtutors = tutorNames.filter(row=>row[0]=="0"|"1").map(row => row [13])

Sheet

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

In Google Apps Script / JavaScript the OR operator is || not |.

Change

var approvedtutors = tutorNames.filter(row=>row[0]=="0"|"1").map(row => row [13])

by

var approvedtutors = tutorNames.filter(row=>row[0]== "0" || row[0] == "1").map(row => row [13])

Reference

  • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda